package com.uwlaser.modules.system.service;

import com.uwlaser.base.PageInfo;
import com.uwlaser.base.CommonService;
import com.uwlaser.modules.system.domain.SysExternalSocketLog;
import com.uwlaser.modules.system.service.dto.SysExternalSocketLogDto;
import com.uwlaser.modules.system.service.dto.SysExternalSocketLogQueryParam;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Set;

/**
* @author QZK
* @date 2022-12-06
*/
public interface SysExternalSocketLogService extends CommonService<SysExternalSocketLog>  {

    static final String CACHE_KEY = "sysExternalSocketLog";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<SysExternalSocketLogDto>
    */
    PageInfo<SysExternalSocketLogDto> queryAll(SysExternalSocketLogQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<SysExternalSocketLogDto>
    */
    List<SysExternalSocketLogDto> queryAll(SysExternalSocketLogQueryParam query);

    SysExternalSocketLog getById(Integer id);
    SysExternalSocketLogDto findById(Integer id);

    /**
     * 插入一条新数据。
     */
    int insert(SysExternalSocketLogDto resources);
    int updateById(SysExternalSocketLogDto resources);
    int removeById(Integer id);
    int removeByIds(Set<Integer> ids);

    int addLog(SysExternalSocketLog log);
    /**
     * socket请求单条重传
     * @param resources
     * @return
     */
    int reuploadOne(SysExternalSocketLog resources) throws Exception;
    /**
     * socket请求一键重传
     * @return
     */
    int reuploadAll();

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<SysExternalSocketLogDto> all, HttpServletResponse response) throws IOException;
}
